package enumdemo;

public class Test {
    public static void main(String[] args) {

        A a = A.A1;
        System.out.println(a);

        System.out.println(a.name());//获取枚举的名字
        System.out.println(a.ordinal());//获取枚举的下标
    }
}
